package practise.mulitThreads.ConcurrentInPractice.Memorizer;

/**
 * Created by richard on 6/13/14.
 */
public class TestClass {
    public static  void main(String[] args){
        ComputeObject computeObject = new ComputeObject(10);
        Memorizer<String> memorizer = new Memorizer<>();
        Visitor<ComputeObject> visitor = new Visitor<>();

        computeObject.setVisitor(visitor);

        System.out.println("put a value");
        memorizer.put("Test",computeObject);
        System.out.println("try to get the value : " + memorizer.get("Test"));
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("try to get the value : " + memorizer.get("Test"));
    }
}
